﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/design.Master" CodeBehind="cakeByTags.aspx.vb" Inherits="CakeThatIBaked.cakeByTags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="theheader">

        Cakes by Tags
        
    </div>
    <div class="thecontainer">
        <div class="thecontainerleft">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
            <ItemTemplate>
            <%# getpics(Eval("ID"), Eval("CakePictureMain"))%>
               
            </ItemTemplate>

            </asp:Repeater>
            </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="cblTags" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:CakeConnection %>" 
                ProviderName="<%$ ConnectionStrings:CakeConnection.ProviderName %>" 
                SelectCommand="SELECT [ID], [CakeTitle], [Author], [CakeDescription], [CakeRating], [CakePictureMain], [Score] FROM [Cakes]">
            </asp:SqlDataSource>
            
            
        
        </div>
        <div class="thecontainerright">
            <asp:CheckBoxList ID="cblTags" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDataSource1" DataTextField="TagName" DataValueField="ID">
            </asp:CheckBoxList>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:CakeConnection %>" 
                ProviderName="<%$ ConnectionStrings:CakeConnection.ProviderName %>" 
                SelectCommand="SELECT [ID], [TagName] FROM [CakeTags]"></asp:SqlDataSource>
        </div>
    </div>
</asp:Content>
